<template>
  <div class="contact-page">
    <div class="container">
      <div class="page-header">
        <h1 class="page-title">联系我</h1>
      </div>
      
      <div class="contact-content">
        <div class="contact-section">
          <h2 class="section-title">联系信息</h2>
          <div class="contact-info">
            <div class="contact-item">
              <div class="contact-icon">📧</div>
              <div class="contact-details">
                <h3 class="contact-label">邮箱</h3>
                <p class="contact-value">contact@myblog.com</p>
              </div>
            </div>
            
            <div class="contact-item">
              <div class="contact-icon">📍</div>
              <div class="contact-details">
                <h3 class="contact-label">地址</h3>
                <p class="contact-value">上海市浦东新区陆家嘴金融中心</p>
              </div>
            </div>
          </div>
        </div>
        
        <div class="contact-section">
          <h2 class="section-title">社交媒体</h2>
          <div class="social-links">
            <a href="#" class="social-link">
              <div class="social-icon">🐙</div>
              <span>GitHub</span>
            </a>
            <a href="#" class="social-link">
              <div class="social-icon">🐦</div>
              <span>Twitter</span>
            </a>
            <a href="#" class="social-link">
              <div class="social-icon">💼</div>
              <span>LinkedIn</span>
            </a>
          </div>
        </div>
        
        <div class="contact-section">
          <h2 class="section-title">发送消息</h2>
          <form class="contact-form" @submit.prevent="submitForm">
            <div class="form-group">
              <label for="name">姓名</label>
              <input 
                type="text" 
                id="name" 
                v-model="form.name" 
                class="form-input" 
                required
              >
            </div>
            
            <div class="form-group">
              <label for="email">邮箱</label>
              <input 
                type="email" 
                id="email" 
                v-model="form.email" 
                class="form-input" 
                required
              >
            </div>
            
            <div class="form-group">
              <label for="subject">主题</label>
              <input 
                type="text" 
                id="subject" 
                v-model="form.subject" 
                class="form-input" 
                required
              >
            </div>
            
            <div class="form-group">
              <label for="message">消息</label>
              <textarea 
                id="message" 
                v-model="form.message" 
                class="form-textarea" 
                rows="5" 
                required
              ></textarea>
            </div>
            
            <button type="submit" class="submit-button">发送消息</button>
          </form>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'ContactPage',
  data() {
    return {
      form: {
        name: '',
        email: '',
        subject: '',
        message: ''
      }
    }
  },
  methods: {
    submitForm() {
      // 这里可以添加表单提交逻辑
      console.log('表单提交:', this.form)
      alert('消息已发送！我会尽快回复您。')
      
      // 重置表单
      this.form = {
        name: '',
        email: '',
        subject: '',
        message: ''
      }
    }
  }
}
</script>

<style scoped>
.contact-page {
  width: 100%;
  padding: 2rem 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  text-align: center;
}

.page-title {
  font-size: 2rem;
  color: #333;
  margin: 0;
  position: relative;
  display: inline-block;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(to right, #667eea, #764ba2);
  border-radius: 2px;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.contact-section {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-section:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.section-title {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: #333;
  position: relative;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(to right, #667eea, #764ba2);
  border-radius: 2px;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 12px;
  background: linear-gradient(to bottom right, #f8f9fa, #e9ecef);
  transition: transform 0.3s ease;
}

.contact-item:hover {
  transform: translateY(-3px);
}

.contact-icon {
  font-size: 1.5rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to right, #667eea, #764ba2);
  color: white;
  border-radius: 50%;
}

.contact-details {
  flex: 1;
}

.contact-label {
  margin: 0 0 0.3rem 0;
  font-size: 1.1rem;
  color: #333;
  font-weight: 600;
}

.contact-value {
  margin: 0;
  color: #666;
  line-height: 1.5;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #333;
  padding: 0.8rem 1.5rem;
  border: 2px solid #667eea;
  border-radius: 30px;
  transition: all 0.3s;
  font-weight: 600;
}

.social-link:hover {
  background: linear-gradient(to right, #667eea, #764ba2);
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.social-icon {
  font-size: 1.2rem;
}

.contact-form {
  display: grid;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: #333;
}

.form-input,
.form-textarea {
  padding: 0.8rem;
  border: 2px solid #e1e5ea;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.submit-button {
  padding: 1rem 2rem;
  background: linear-gradient(to right, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  justify-self: start;
  box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
}

.submit-button:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .contact-info {
    grid-template-columns: 1fr;
  }
  
  .social-links {
    flex-direction: column;
    gap: 1rem;
  }
  
  .social-link {
    justify-content: center;
  }
  
  .page-title {
    font-size: 1.5rem;
  }
}
</style>